
const validateObj = {
  required: { required: true, message: '输入不能为空', trigger: 'blur' },
  selected: { required: true, message: '选择不能为空', trigger: 'change' },
  ipv4: { validator: /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, message: '请输入ipv4格式的ip', trigger: 'blur' },
}
export const validate = (valid) => {
  return valid && valid.map(item => {
    return validateObj[item]
  })


}